package com.gitee.cui.springcloud.controller;

import javax.annotation.Resource;

import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.client.RestTemplate;

/**
 * 订单controller层
 *
 * @author cuiqingqiang
 * @version 1.0
 * @date 2022-03-05 12:20
 **/
@RestController
@Slf4j
@RequestMapping(value = "/consumer")
public class OrderZKController {

	public static final String INVOKE_URL = "http://cloud-provider-payment";

	@Resource
	private RestTemplate restTemplate;

	@GetMapping(value = "/payment/zk")
	public String zookeeperInfo() {
		return restTemplate.getForObject(INVOKE_URL + "/payment/zk", String.class);
	}
}
